package cn.kgc.ssm.controller;

import cn.kgc.ssm.entity.User;
import cn.kgc.ssm.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author 课工场
 * @date 2024/7/24
 * @description
 */
@RestController
@RequestMapping("user")
public class UserController {

    private UserService userService;

    @GetMapping("list")
    public List<User> userList() {

        return userService.userList();
    }

    @GetMapping("page")
    public Map<String, Object> userPage(Integer page, Integer limit) {

        return userService.userPage(page, limit);
    }
}
